/*
 * @Descripttion:
 * @version:
 * @Author: 尹伊
 * @Date: 2019-07-12 09:10:43
 * @LastEditors: 尹伊
 * @LastEditTime: 2020-05-25 10:44:17
 */
import fetch from "../util/fetch";
import {
  mogu,
  jaz
} from "../util/api.config";

let homeApi = {};
// 获取轮播图的图片
homeApi.getSwiperList = params =>
  fetch({
    url: `${mogu}/swiperImage`,
    method: "GET",
    params
  });

// 获取商品分类
homeApi.getCategoryList = params =>
  fetch({
    url: `${mogu}/categoryList`,
    method: "GET",
    params
  });

// tab栏-发现-详细内容
homeApi.getGoodsDetails = params =>
  fetch({
    url: `${mogu}/goodsDetails`,
    method: "GET",
    params
  });

// 上传
homeApi.uploadImage = data =>
  fetch({
    url: "http://192.168.43.220:7788/jaz/upload",
    // url: "https://192.168.8.132:80/annals/pab/annex/insert",
    method: "POST",
    headers: {
      'content-type': 'application/json;charset=utf-8'
    },
    dataType: 'json',
    data
  });
export default homeApi;
